package org.vison.wonfu.framework.soa;

import org.vison.wonfu.framework.soa.exception.RpcException;

public interface Invoker<T> {

    /**
     * get service interface.
     *
     * @return service interface.
     */
    Class<T> getInterface();

    /**
     * invoke.
     *
     * @param invocation invocation
     * @return result
     * @throws RpcException Rpc Exception
     */
    Result invoke(Invocation invocation) throws RpcException;
}
